package rcpexample.sampleview;



import java.util.ArrayList;
import java.util.List;

public class ProjectTree {
private String name;
private List children = new ArrayList();
private ProjectTree parent;
private String filepath;

public ProjectTree(String n) { name = n; }

protected Object getParent() { return parent; }

public ProjectTree addChild(ProjectTree child, String filepath) {
children.add(child);
child.parent = this;
child.filepath = filepath;
child.name = child.name;
return this;
}

public List getChildren() { return children; }

public String toString() { return name; }

public void removeChildren(ProjectTree parent) {
parent.children.removeAll(children);
}

public String getFilepath () { return filepath; }
}